package top.yokey.shopnc.model;

import top.yokey.base.base.BaseHttpClient;
import top.yokey.base.base.BaseHttpListener;

@SuppressWarnings("ALL")
public class SeccodeModel {

    private final String ACT = "seccode";
    private static volatile SeccodeModel instance;

    public static SeccodeModel get() {
        if (instance == null) {
            synchronized (SeccodeModel.class) {
                if (instance == null) {
                    instance = new SeccodeModel();
                }
            }
        }
        return instance;
    }

    public void makeCodeKey(BaseHttpListener baseHttpListener) {

        BaseHttpClient.get().ready(ACT, "makecodekey")
                .get(baseHttpListener);

    }

    public String makeCode(String key) {

        return BaseHttpClient.get().ready(ACT, "makecode").add("k", key).add("t", "0.7335435011800268").getApiUrl();

    }

}
